#pragma once


//-----------------------------------------------------------------------------
//															CProfilerSection
//-----------------------------------------------------------------------------
class CProfilerSection
{
public:
	CProfilerSection(ISystem* pSystem, const char* name);

	void Begin();
	void End();

	uint GetCallsCount() const;
	float GetTime() const;
	const char* GetName() const;

	void ResetCallCounter();

private:
	bool		m_started;
	float		m_time;
	float		m_smoothed_time;
	float		m_start_time;
	string	m_name;
	uint		m_call_counter;
	ITimer*	m_pTimer;
};


//-----------------------------------------------------------------------------
//												CProfilerSectionTrigger
//-----------------------------------------------------------------------------
class CProfilerSectionTrigger
{
public:
	CProfilerSectionTrigger(CProfilerSection* section);
	~CProfilerSectionTrigger();

private:
	CProfilerSection* m_section;
};